<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Train one epoch with a set of training data</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.fann-test.html">fann_test</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.fann-train-on-data.html">fann_train_on_data</a></div>
 <div class="up"><a href="ref.fann.html">Fann 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.fann-train-epoch" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">fann_train_epoch</h1>
  <p class="verinfo">(PECL fann &gt;= 1.0.0)</p><p class="refpurpose"><span class="refname">fann_train_epoch</span> &mdash; <span class="dc-title">Train one epoch with a set of training data</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.fann-train-epoch-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">float</span> <span class="methodname"><strong>fann_train_epoch</strong></span>
    ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$ann</code></span>
   , <span class="methodparam"><span class="type">resource</span> <code class="parameter">$data</code></span>
   )</div>

  <p class="para rdfs-comment">
   Train one epoch with the training data stored in data. One epoch is
   where all of the training data is considered exactly once.
  </p>
  <p class="para">
   This function returns the MSE error as it is calculated either before or during the actual training.
   This is not the actual MSE after the training epoch, but since calculating this will require to go
   through the entire training set once more. It is more than adequate to use this value during training.
  </p>
  <p class="para">
   The training algorithm used by this function is chosen by <span class="function"><a href="function.fann-set-training-algorithm.html" class="function">fann_set_training_algorithm()</a></span>
   function.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.fann-train-epoch-parameters">
  <h3 class="title">参数</h3>
  <dl>

   
    <dt>
<em><code class="parameter">ann</code></em></dt>

    <dd>

     <p class="para">Neural network <span class="type"><a href="language.types.resource.html" class="type resource">resource</a></span>.</p>
    </dd>

   
   
    <dt>
<em><code class="parameter">data</code></em></dt>

    <dd>

     <p class="para">Neural network training data <span class="type"><a href="language.types.resource.html" class="type resource">resource</a></span>.</p>
    </dd>

   
  </dl>

 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.fann-train-epoch-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   The MSE, or <strong><code>FALSE</code></strong> on error.
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.fann-train-epoch-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.fann-train-on-data.html" class="function" rel="rdfs-seeAlso">fann_train_on_data()</a> - Trains on an entire dataset for a period of time</span></li>
    <li class="member"><span class="function"><a href="function.fann-test-data.html" class="function" rel="rdfs-seeAlso">fann_test_data()</a> - Test a set of training data and calculates the MSE for the training data</span></li>
    <li class="member"><span class="function"><a href="function.fann-get-mse.html" class="function" rel="rdfs-seeAlso">fann_get_MSE()</a> - Reads the mean square error from the network</span></li>
    <li class="member"><span class="function"><a href="function.fann-set-training-algorithm.html" class="function" rel="rdfs-seeAlso">fann_set_training_algorithm()</a> - Sets the training algorithm</span></li>
   </ul>
  </p>
 </div>



</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.fann-test.html">fann_test</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.fann-train-on-data.html">fann_train_on_data</a></div>
 <div class="up"><a href="ref.fann.html">Fann 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
